package com.zkw.group.service;

import com.zkw.group.entity.*;
import com.zkw.group.mapper.CourseIndicatorSupportMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseIndicatorSupportService {

    @Autowired
    private CourseIndicatorSupportMapper courseIndicatorSupportMapper;

    //通过课程课程对应二级指标编号查询课程对应能力指标支撑度信息
    public List<CourseIndicatorSupport> getAllCourseIndicatorSupportList(String sid,String cname, int pageStart, int pageSize){
        return courseIndicatorSupportMapper.getAllCourseIndicatorSupportList(sid,cname,pageStart,pageSize);
    }

    //获取该课程对应能力指标支撑度书目
    public int getCourseIndicatorSupportCounts(String sid,String cname){
        return courseIndicatorSupportMapper.getCourseIndicatorSupportCounts(sid,cname);
    }

    //添加课程对应能力指标支撑度
    public int addCourseIndicatorSupport(CourseIndicatorSupport courseIndicatorSupport){
        return courseIndicatorSupportMapper.addCourseIndicatorSupport(courseIndicatorSupport);
    }

    //删除指定课程对应能力指标支撑度
    public int deleteCourseIndicatorSupport(String sid){
        return courseIndicatorSupportMapper.deleteCourseIndicatorSupport(sid);
    }


    //获取每个二级指标各个支撑度数目统计
    public List<IndicatorSupport> getIndicatorSupportList(String sid,int pageStart, int pageSize){
        return courseIndicatorSupportMapper.getIndicatorSupportList(sid,pageStart,pageSize);
    }

    //获取每个二级指标各个支撑度数目统计数目
    public int getIndicatorSupportCounts(String sid){
        return courseIndicatorSupportMapper.getIndicatorSupportCounts(sid);
    }

    //获取每个课程各个支撑度数目统计
    public List<CourseSupport> getCourseSupportList(String cname, int pageStart, int pageSize){
        return courseIndicatorSupportMapper.getCourseSupportList(cname,pageStart,pageSize);
    }

    //获取每个课程各个支撑度数目统计数目
    public int getCourseSupportCounts(String cname){
        return courseIndicatorSupportMapper.getCourseSupportCounts(cname);
    }

    //获取一级指标名称以及编号列表
    public List<ProfesIndicatorOne> getIndicatorOneNameList(){
        return courseIndicatorSupportMapper.getIndicatorOneNameList();
    }

    //获取一级指标下的二级指标名称以及编号列表
   public List<ProfesIndicatorTwo> getIndicatorTwoNameList(String fid){
        return courseIndicatorSupportMapper.getIndicatorTwoNameList(fid);
   }
}
